home *** CD-ROM | disk | FTP | other *** search
- Path: news.express.co.nz!usenet
- From: bruce@faxmail.co.nz (Bruce Simpson)
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc,comp.os.ms-windows.programmer.tools.misc,alt.folklore.computers
- Subject: Re: C++ with Zapp vs. Delphi
- Date: Fri, 12 Jan 1996 22:09:07 GMT
- Organization: FaxMail Technologies
- Message-ID: <4d6ir9$m70@news.express.co.nz>
- References: <4cfor8$qno@picasso.op.net> <lKI7w0JfF61N089yn@oslonett.no> <4coar6$d4n@sun4.bham.ac.uk> <4cpek3$i7@brasaap.iaehv.nl> <4cv6bn$eiu@uuneo.neosoft.com> <rq+8w0JfFC7A089yn@oslonett.no>
- Reply-To: bruce@faxmail.co.nz
- NNTP-Posting-Host: bsimpson.iprolink.co.nz
- X-Newsreader: Forte Free Agent 1.0.82
-
- mobergru@oslonett.no (Rune Moberg) wrote:
-
- >Two years ago, I made a small menu program (AMI bios style), using BP 7.0.
- >I had objects, some polymorphism, the works...
- >The first draft (without any text, only the basic UI) compiled to 7K. That's
- >far less than the stuff the BC++ 3.1 compiler threw at me (20K for small
- >"hello world" style C apps).
-
- This is very often a case of style and compiler choice. There's frequently
- a world of difference in the size of these two "hello world" programs:
-
-
- --- program 1 ----------------------------------------
-
- #include <stdio.h>
-
- int main(int argc, char *argv[])
- {
- printf("Hello World\n");
- }
-
-
- --- program 2 -----------------------------------------
-
- #include <stdio.h>
-
- int mail(int argc, char *argv[])
- {
- puts("Hello World\n");
- }
-
-
- Program 1 will link the library routines for handling printf() and this can
- be a lot of code, whereas program 2 will link the smaller and more
- efficient puts() function.
-
- Many times, programmers don't even think about this and to be fair, most of
- the time it doesn't matter very much. These days a lot of PCs are being
- shipped with 850MB or 1GB HDs which are formatted as a single partition
- with a resulting cluster size of 16Kbytes. A 2Kbyte program is actually
- going to require just as much storage as a 15.9K program. Likewise, the
- size of the .EXE file is not always a true indicator of the amount of RAM
- that the program uses when running.
-
- The difference between Pascal and C or C++ disappears fairly quickly when
- you start looking at "real-world" applications of any size.
-
- ---------------------------------------------------------------
- Check out the "ShowCase" on FaxMail for Web-space from NZ$5/mth
- FaxMail: http://www.actrix.gen.nz/biz/faxmail
- My page: http://www.voyager.co.nz/~bsimpson
-
-